#-*- coding: utf-8 -*-

## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.

## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.

## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

import config
import option_line

import vpyragua

class Pyragua:
    def __init__(self):
        (options, args) = option_line.parse_command_line()
        # La configuración
        if options.no_config:  # No carga configuración inical
            config.init_config(arg='-q')
        elif options.config_file:
            config.init_config(path=[optins.config_file], arg='-t')
        else:
            config.init_config()

        if options.verbose:
            # TODO: Inicar el log en modo más verboso.
            logging.info("Iniciando en modo verboso")
        self.ventana = vpyragua.VPyragua(self, None)
        self.ventana.loop()

        # args -> archivos para abrir en Pyragua al iniciar.

    def cerrar(self):
        print "Terminando Pyragua"
        
        #Se debe realizar todo lo relacionado al cierre

if __name__ == '__main__':
    p = Pyragua()
    
